using FreeSql.DataAnnotations;

namespace SchoolApp_Material.Models;

/// <summary>
/// 学生
/// </summary>
[Table(Name = "student")]
public class Student : DataBase
{
    /// <summary>
    /// 编号
    /// </summary>
    [Column(Name = "code", StringLength = 50, IsNullable = true)]
    public string? Code { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [Column(Name = "name", StringLength = 50, IsNullable = true)]
    public string? Name { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    [Column(Name = "sex", StringLength = 10, IsNullable = true)]
    public string? Sex { get; set; }

    /// <summary>
    /// 出生年份
    /// </summary>
    [Column(Name = "birth_year", IsNullable = true)]
    public int? BirthYear { get; set; }

    /// <summary>
    /// 班级年级
    /// </summary>
    [Column(Name = "form_year", IsNullable = true)]
    public int? FormYear { get; set; }

    /// <summary>
    /// 班级编号
    /// </summary>
    [Column(Name = "form_code", IsNullable = true)]
    public string? FormCode { get; set; }
}